-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimization by class MonadThunk arguments order #859
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Helps with further work.
This is much more performant, sine gives tail recursion. Also gives more straight-forward code implementation. M src/Nix/Cited/Basic.hs M src/Nix/Convert.hs M src/Nix/Lint.hs M src/Nix/Normal.hs M src/Nix/Standard.hs M src/Nix/Thunk.hs M src/Nix/Thunk/Basic.hs M src/Nix/Value.hs M src/Nix/Value/Equal.hs
`forces` are already flipped, which gives tail recursion. This one gives more straight-forward implementation & use, maybe with some performance optimization. M src/Nix/Cited/Basic.hs M src/Nix/Standard.hs M src/Nix/Thunk.hs M src/Nix/Thunk/Basic.hs
Anton-Latukha
force-pushed
the
2021-02-22-thunk-force-optimization
branch
from
February 23, 2021 17:42
63f881c
to
f49fb00
Compare
Anton-Latukha
force-pushed
the
2021-02-22-thunk-force-optimization
branch
from
February 23, 2021 19:06
f49fb00
to
46c9ab8
Compare
They are not really used currently in the project. This commit concludes the `class MonadThunk` arguments optimization work. Next would be unflip of the `demand` and the moving-out of the stuff from the implementations. ChangeLog: add note on the querry{M,Thunk} changes
Anton-Latukha
changed the title
MonadThunk optimization
optimization by class MonadThunk arguments order
Feb 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementing the tail recursion for all
class MonadThunk
binary & ternary methods:force
&forceThunk
forceEff
&forceThunkEff
querryM
&querryThunk
further
The path towards #850.
Steps in next patch merges:
demand
optimization.Yesterday tried to go all the way - well, Functional Dependencies, of the
class MonadThunk
, is the pinnacle of the type system. And on factoring out the application fromforce
- Functional Dependencies so far prevented the transference of types between HNix modus operandi.So doing all possible improvement work up to it. After these optimizations, they also would be a clear picture & with more experienced people we would have the definite conclusion to the optimization & Functional Dependencies situation.
Tail recursion is already a big thing.